home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / ck5a189s / ckuus2.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  72KB  |  2,095 lines

  1. /*  C K U U S 2  --  User interface STRINGS & help module for C-Kermit  */
  2.  
  3. /*
  4.   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
  5.   Columbia University Academic Information Systems, New York City.
  6.  
  7.   Copyright (C) 1985, 1993, Trustees of Columbia University in the City of New
  8.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  9.   sold for profit as a software product itself, nor may it be included in or
  10.   distributed with commercial products or otherwise distributed by commercial
  11.   concerns to their clients or customers without written permission of the
  12.   Office of Kermit Development and Distribution, Columbia University.  This
  13.   copyright notice must not be removed, altered, or obscured.
  14. */
  15.  
  16. /*
  17.  This module separates long strings from the body of the other ckuus* modules.
  18. */
  19.  
  20. #include "ckcdeb.h"
  21. #include "ckcnet.h"
  22. #include "ckcasc.h"
  23. #include "ckcker.h"
  24. #include "ckuusr.h"
  25. #include "ckcxla.h"
  26.  
  27. extern char *ccntab[];
  28.  
  29. #ifndef NOICP
  30. #ifdef DCMDBUF
  31. extern char *cmdbuf;
  32. #else
  33. extern char cmdbuf[];
  34. #endif /* DCMDBUF */
  35. #endif /* NOICP */
  36.  
  37. #ifdef DEBUG
  38. extern char debfil[];
  39. #endif /* DEBUG */
  40. #ifdef TLOG
  41. extern char trafil[];
  42. #endif
  43.  
  44. extern char *xarg0;
  45. extern int nrmt, nprm, dfloc, local, parity, duplex, escape;
  46. extern int turn, flow;
  47. extern int binary, warn, quiet, keep;
  48. extern int success;
  49.  
  50. extern long speed;
  51. extern char *dftty, *versio, *ckxsys;
  52. extern struct keytab prmtab[];
  53. extern struct keytab remcmd[];
  54.  
  55. /* Command-Line help (Unix command-line arguments) */
  56.  
  57. #ifndef NOCMDL
  58. static
  59. char *hlp1[] = {
  60. #ifndef NOICP
  61. " [cmdfile] [-x arg [-x arg]...[-yyy]..] [ = text ] ]\n",
  62. #else
  63. "[-x arg [-x arg]...[-yyy]..]\n",
  64. #endif
  65. "  -x is an option requiring an argument, -y an option with no argument.\n",
  66. #ifndef NOICP
  67. #ifndef NOSPL
  68. "     = means ignore following words, but place in array \\&@[].\n",
  69. #else
  70. "     = means ignore following material.\n",
  71. #endif /* NOSPL */
  72. #else
  73. "     = means ignore following material.\n",
  74. #endif /* NOICP */
  75. "actions:\n",
  76. "  -s files  send files                    -r  receive files\n",
  77. "  -s -      send files from stdin         -k  receive files to stdout\n",
  78. #ifndef NOSERVER
  79. "  -x        enter server mode             -f  finish remote server\n\n",
  80. #else
  81. "  -f        finish remote server\n\n",
  82. #endif /* NOSERVER */
  83. "  -g files  get remote files from server (quote wildcards)\n",
  84. "  -a name   alternate file name, used with -s, -r, -g\n",
  85. "  -c        connect (before file transfer), used with -l and -b\n",
  86. "  -n        connect (after file transfer), used with -l and -b\n\n",
  87. "settings:\n",
  88. "  -l line   communication line device     -q   quiet during file transfer\n",
  89. #ifdef NETCONN
  90. "  -j host   network host name             -i   binary file transfer\n",
  91. #else
  92. "  -i        binary file transfer\n",
  93. #endif /* NETCONN */
  94. "  -b bps    line speed, e.g. 2400         -t   half duplex, xon handshake\n",
  95. #ifdef DEBUG
  96. "  -p x      parity, x = e,o,m,s, or n     -d   log debug info to debug.log\n",
  97. #else
  98. "  -p x      parity, x = e,o,m,s, or n\n",
  99. #endif /* DEBUG */
  100. #ifndef NOICP
  101. "  -y name   alternate init file name      -w   write over files\n",
  102. #else
  103. "  -w        write over files\n",
  104. #endif /* NOICP */
  105. "  -e n      receive packet length         -v n window size\n",
  106. #ifndef NODIAL
  107. "  -m name   modem type                    -z   force foreground\n",
  108. #else
  109. "  -z        force foreground\n",
  110. #endif /* NODIAL */
  111. #ifdef SUNX25
  112. "  -X  X.25 address              -o index  X.25 closed user group call\n",
  113. "  -u  X.25 reverse charge call  -U string X.25 call user data\n",
  114. #endif /* SUNX25 */
  115. #ifdef NOICP
  116. "Interactive command parser removed.\n",
  117. #else
  118. "If no action command is included, or -S is, enter interactive dialog.\n",
  119. #endif
  120. ""
  121. };
  122.  
  123. /*  U S A G E */
  124.  
  125. VOID
  126. usage() {
  127. #ifndef MINIX
  128. #ifdef NOICP
  129. #endif /* NOICP */    
  130.     conol("Usage: ");
  131.     conol(xarg0);
  132.     conola(hlp1);
  133. #else
  134.     conol("Usage: ");
  135.     conol(xarg0);
  136.     conol(" [-x arg [-x arg]...[-yyy]..] ]\n");
  137. #endif /* MINIX */
  138. }
  139. #endif /* NOCMDL */
  140.  
  141. #ifndef NOICP
  142.  
  143. /*  Interactive help strings  */
  144.  
  145. static char *tophlp[] = { 
  146. "Trustees of Columbia University in the City of New York.\n",
  147.  
  148. #ifndef NOHELP
  149. "Type INTRO for an introduction to C-Kermit, press ? for a list of commands.",
  150. "Type HELP followed by a command name for help about a specific command.",
  151. "Type NEWS for news about new features.",
  152. #else
  153. "Type ? for a list of commands; see documentation for detailed descriptions.",
  154. #endif /* NOHELP */
  155. "While typing commands, you may use the following special characters:",
  156. " DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.",
  157. " CTRL-W:  Delete the most recent word typed.",
  158. " CTRL-U:  Delete the current line.",
  159. " CTRL-R:  Redisplay the current line.",
  160. " ?        (question mark) Display a menu for the current command field.",
  161. " ESC      (or TAB) Attempt to complete the current field.",
  162. " \\        (backslash) include the following character literally",
  163. #ifndef NOSPL
  164. "          or introduce a backslash code, variable, or function.",
  165. #else
  166. "          or introduce a numeric backslash code.",
  167. #endif /* NOSPL */
  168.  
  169. "Command words other than filenames can be abbreviated in most contexts.",
  170. #ifndef NOCMDL
  171. "From system level, type \"kermit -h\" for help about command-line options.",
  172. #endif /* NOCMDL */
  173. " ",
  174. #ifdef MAC
  175. "Documentation for Command Window: \"Using C-Kermit\" by Frank da Cruz and",
  176. "Christine M. Gianone. Digital Press ISBN: 1-55558-108-0; Prentice-Hall ISBN:",
  177. "0-13-037490-3.  DECdirect: +1-800-344-4825, Order # EY-J896E-DP, US $34.95.",
  178. #else
  179. "DOCUMENTATION: \"Using C-Kermit\" by Frank da Cruz and Christine M. Gianone,",
  180. "Digital Press.  DP ISBN: 1-55558-108-0; Prentice-Hall ISBN: 0-13-037490-3.",
  181. "DECdirect: +1-800-344-4825, Order Number EY-J896E-DP, US $34.95.",
  182. #endif /* MAC */
  183. ""
  184. };
  185.  
  186. #ifndef NOHELP 
  187. char *newstxt[] = {
  188. "New features since \"Using C-Kermit\" was published:\n",
  189. #ifndef NOHEBREW
  190. " . Hebrew character-set translation; commands:",
  191. "     SET { TRANSFER, TERMINAL, FILE } CHARACTER-SET -",
  192. "         { HEBREW-ISO, HEBREW-7, CP862 }",
  193. "     SHOW CHARACTER-SETS",
  194. #endif /* NOHEBREW */
  195. #ifndef NOCKSPEED
  196. " . A way to send control characters \"bare\" in Kermit packets; commands:",
  197. "     SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }",
  198. "     SHOW CONTROL-PREFIXING",
  199. #endif /* NOCKSPEED */
  200. " . A way to change the Control and Repeat prefixes; commands:",
  201. "     SET { SEND, RECEIVE } CONTROL-PREFIX <code>",
  202. "     SET REPEAT PREFIX <code>",
  203. "     SET REPEAT COUNTS { ON, OFF }",
  204. " . A way to change the packet-mode keyboard-breakout mechanism; commands:",
  205. "     SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ] }",
  206. "     SHOW PROTOCOL",
  207. #ifdef OS2
  208. " . New OS/2 VT terminal-emulation control:",
  209. "     SET TERMINAL ANSWERBACK { ON, OFF }",
  210. #endif /* OS2 */
  211. #ifndef NOSPL
  212. " . A new string function, \\freplace(s1,s2,s3).",
  213. " . A new command, SET OUTPUT PACING <msec>.",
  214. " . A new command, APC, for sending commands to MS-DOS Kermit.",
  215. #endif /* NOSPL */
  216. #ifdef POSIX
  217. #ifndef BSD44
  218. " . File date/time preservation and hostname identification added for POSIX.",
  219. #endif /* BSD44 */
  220. #endif /* POSIX */
  221. " . Bug fixes, support for more systems.",
  222. "\nType the appropriate HELP commands for more information,",
  223. "consult the CKCKER.UPD (C-Kermit Update) file for complete details.",
  224. ""
  225. };
  226. #endif /* NOHELP */
  227.  
  228. #ifndef NOHELP
  229. char *introtxt[] = {
  230. "Welcome to C-Kermit communications software for:",
  231. " . Error-free file transfer",
  232. " . Terminal connection",
  233. #ifndef NOSPL
  234. " . Script programming",
  235. #endif /* NOSPL */
  236. #ifndef NOICS
  237. " . International character set conversion",
  238. #endif /* NOICS */
  239. "\nSupporting:",
  240. " . Serial connections, direct or dialed.",
  241. #ifndef NODIAL
  242. " . Automatic modem dialing",
  243. #endif /* NODIAL */
  244. #ifdef TCPSOCKET
  245. " . TCP/IP network connections",
  246. #endif /* TCPSOCKET */
  247. #ifdef SUNX25
  248. " . X.25 network connections",
  249. #endif /* SUNX25 */
  250. #ifdef OS2
  251. #ifdef DECNET
  252. " . DECnet/PATHWORKS LAT Ethernet connections",
  253. #endif /* DECNET */
  254. #ifdef NPIPE
  255. " . Microsoft LAN Manager named-pipe network connections",
  256. #endif /* NPIPE */
  257. #endif /* OS2 */
  258. " . UNIX, VAX/VMS, OS/2, AOS/VS, OS-9, Commodore Amiga, Atari ST.",
  259. "\nBasic C-Kermit commands:",
  260. "  EXIT          exit from C-Kermit",
  261. "  HELP          request help about a command",
  262. "  TAKE          execute commands from a file",
  263.  
  264. "\nCommands for file transfer:",
  265. "  SEND          send files",
  266. "  RECEIVE       receive files",
  267. "  SERVER        be a file transfer server",
  268.  
  269. "\nEssential settings:",
  270. "  SET PARITY    communications parity",
  271. "  SET FLOW      communications flow control, such as XON/XOFF",
  272. "  SET FILE      file settings, for example TYPE TEXT or TYPE BINARY",
  273.  
  274. "\nTo make a direct serial connection:",
  275. "  SET LINE      select serial communication device",
  276. "  SET SPEED     select communication speed   ",
  277. "  CONNECT       begin terminal connection",
  278.  
  279. #ifndef NODIAL
  280. "\nTo dial out with a modem:",
  281. "  SET MODEM     select modem type",
  282. "  SET LINE      select serial communication device",
  283. "  SET SPEED     select communication speed   ",
  284. "  DIAL          dial ",
  285. "  CONNECT       begin terminal connection",
  286. #endif /* NODIAL */
  287.  
  288. #ifdef NETCONN
  289. "\nTo make a network connection:",
  290. "  SET NETWORK   select network type",
  291. "  SET HOST      select network host",
  292. "  CONNECT       begin terminal connection",
  293. #ifdef TNCODE
  294. "  TELNET        select a TCP/IP host and CONNECT to it",
  295. #endif /* TNCODE */
  296. #endif /* NETCONN */
  297.  
  298. "\nTo return from a terminal connection to the C-Kermit prompt:",
  299. "  Type your escape character followed by the letter C.",
  300.  
  301. "\nTo display your escape character:",
  302. "  SHOW ESCAPE",
  303.  
  304. "\nTo display other settings:",
  305. "  SHOW COMMUNICATIONS, SHOW TERMINAL, SHOW FILE, SHOW PROTOCOL, etc.",
  306.  
  307. "\nFor further information about a particular command, type HELP xxx,",
  308. "where xxx is the name of the command.  For documentation, news of new",
  309. "releases, and information about other Kermit software, contact:\n",
  310. "  Kermit Distribution        E-mail:",
  311. "  Columbia University        kermit@columbia.edu (Internet)",
  312. "  612 West 115th Street      KERMIT@CUVMA (BITNET/EARN/CREN)",
  313. "  New York, NY  10025  USA",
  314. "  Phone: +1 212 854-3703     Fax: +1 212 662-6442",
  315. ""
  316. };
  317.  
  318. static char *hmxxbye = "Syntax: BYE\n\
  319. Shut down and log out a remote Kermit server";
  320.  
  321. static char *hmxxclo[] = {
  322. "Syntax:  CLOSE name",
  323. "Example: CLOSE SESSION\n",
  324. "Close one of the following logs or files:",
  325. "  SESSION",
  326. #ifdef TLOG
  327. "  TRANSACTION",
  328. #endif /* TLOG */
  329. "  PACKET",
  330. #ifdef DEBUG
  331. "  DEBUGGING",
  332. #endif /* DEBUG */
  333. #ifndef NOSPL
  334. "  READ",
  335. "  WRITE",
  336. #endif /* NOSPL */
  337. "Type HELP LOG and HELP OPEN for further info.", "" };
  338.  
  339. static char *hmxxcon = "Syntax: CONNECT (or C)\n\n\
  340. Connect to a remote computer via the tty device given in the most recent\n\
  341. SET LINE command, or the network host named in the most recent SET HOST\n\
  342. command.  Type the escape character followed by C to get back, or followed\n\
  343. by ? for a list of CONNECT-mode escape commands.";
  344.  
  345. static char *hmxxget = "Syntax: GET filespec\n\
  346. Tell the remote Kermit server to send the named file or files.\n\
  347. If the filespec is omitted, then you are prompted for the remote and\n\
  348. local filenames separately.";
  349.  
  350. static char *hmxxlg[] = { "Syntax: LOG (or L) name [ { NEW, APPEND } ]",
  351. "Record information in a log file:\n",
  352. #ifdef DEBUG
  353. "DEBUGGING     Debugging information, to help track down bugs in the C-Kermit",
  354. "              program (default log name is debug.log).\n",
  355. #endif /* DEBUG */
  356. "PACKETS       Kermit packets, to help with protocol problems (packet.log)",
  357. "SESSION       Terminal session, during CONNECT command (session.log)",
  358. #ifdef TLOG
  359. "TRANSACTIONS  Names and statistics about files transferred (transact.log)\n",
  360. #endif /* TLOG */
  361. "If you include the APPEND keyword after the filename, the existing log file,",
  362. "if any, is appended to; otherwise a new file is created.",
  363. "" } ;
  364.  
  365. #ifndef NOSCRIPT
  366. static char *hmxxlogi[] = { "\
  367. Syntax: SCRIPT text\n",
  368. "Login to a remote system using the text provided.  The login script",
  369. "is intended to operate similarly to uucp \"L.sys\" entries.",
  370. "A login script is a sequence of the form:\n",
  371. "  expect send [expect send] . . .\n",
  372. "where 'expect' is a prompt or message to be issued by the remote site, and",
  373. "'send' is the names, numbers, etc, to return.  The send may also be the",
  374. "keyword EOT, to send control-d, or BREAK (or \\\\b), to send a break signal.",
  375. "Letters in send may be prefixed by ~ to send special characters.  These are:",
  376. "~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t",
  377. "append a return, and ~o[o[o]] for octal of a character.  As with some",
  378. "uucp systems, sent strings are followed by ~r unless they end with ~c.\n",
  379. "Only the last 7 characters in each expect are matched.  A null expect,",
  380. "e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect",
  381. "that a sequence might not arrive, as with uucp, conditional sequences",
  382. "may be expressed in the form:\n",
  383. "  -send-expect[-send-expect[...]]\n",
  384. "where dashed sequences are followed as long as previous expects fail.",
  385. "" };
  386. #endif
  387.  
  388. static char *hmxxrc[] = { "Syntax: RECEIVE (or R) [filespec]\n",
  389. "Wait for a file to arrive from the other Kermit, which must be given a",
  390. "SEND command.  If the optional filespec is given, the (first) incoming",
  391. "file will be stored under that name, otherwise it will be stored under",
  392. "the name it arrives with.",
  393. "" } ;
  394.  
  395. static char *hmxxsen = "\
  396. Syntax: SEND (or S) filespec [name]\n\n\
  397. Send the file or files specified by filespec.\n\
  398. filespec may contain wildcard characters '*' or '?'.  If no wildcards,\n\
  399. then 'name' may be used to specify the name 'filespec' is sent under; if\n\
  400. 'name' is omitted, the file is sent under its own name.";
  401.  
  402. #ifndef NOMSEND
  403. static char *hmssmse = "\
  404. Syntax: MSEND filespec [ filespec [ ... ] ]\n\n\
  405. Send the files specified by the filespecs.  One or more filespecs may be\n\
  406. listed, separated by spaces.  Any or all filespecs may contain wildcards\n\
  407. and they may be in different directories.  An alternate name cannot be given.";
  408. #endif /* NOMSEND */
  409.  
  410. #ifndef NOSERVER
  411. static char *hmxxser = "Syntax: SERVER\n\n\
  412. Enter server mode on the currently selected line.  All further commands\n\
  413. will be taken in packet form from the other Kermit program.  Use FINISH\n\
  414. or BYE to get C-Kermit out of server mode.";
  415. #endif /* NOSERVER */
  416.  
  417. static char *hmhset[] = { "\
  418. The SET command is used to establish various communication or file",
  419. "parameters.  The SHOW command can be used to display the values of",
  420. "SET parameters.  Help is available for each individual parameter;",
  421. "type HELP SET ? to see what's available.",
  422. "" } ;
  423.  
  424. #ifndef NOSETKEY
  425. static char *hmhskey[] = { "Syntax: SET KEY k text\n",
  426. "Map the key k to send 'text' when pressed during CONNECT mode.",
  427. "K can be expressed as decimal number or backslash code, 'text'",
  428. "can also contain any backslash code.  If 'text' has the length 1",
  429. "it is treated specially.  In some environments (OS/2, for example)",
  430. "that single character may be wider than 8 bits, if specified in",
  431. "backslash notation.  In this case, a scan code mapping takes place,",
  432. "i.e. key k takes over the function of the key whose scan code is",
  433. "assigned to k.  This may even be a controlling key for the CONNECT",
  434. "mode.  If 'text' is empty, the default key binding is restored for",
  435. #ifndef NOCSETS
  436. "the key k.  SET KEY mappings take place before terminal character-set",
  437. "translation.",
  438. #else
  439. "the key k.",
  440. #endif /* NOCSETS */
  441. ""};
  442. #endif /* NOSETKEY */
  443.  
  444. static char *hmxychkt[] = { "Syntax: SET BLOCK-CHECK type\n",
  445. "Type of packet block check to be used for error detection, 1, 2, 3, or",
  446. "BLANK-FREE-2.  Type 1 is standard, and catches most errors.  Types 2 and 3",
  447. "specify more rigorous checking at the cost of higher overhead.  The",
  448. "BLANK-FREE-2 type is the same as Type 2, but is guaranteed to contain no",
  449. "blanks.",
  450. "" } ;
  451.  
  452. #ifdef CK_SPEED
  453. static char *hmxyqctl[] = {
  454. "Syntax: SET CONTROL-CHARACTER { PREFIXED, UNPREFIXED } { <code>..., ALL }\n",
  455. "<code> is the numeric ASCII code for a control character 1-31, 127-159, 255.",
  456. "The word \"ALL\" means the command applies to all characters in this range.",
  457. "\nPREFIXED <code> means the given control character must be converted to a",
  458. " printable character and prefixed, the default for all control characters.",
  459. "\nUNPREFIXED <code> means you think it is safe to send the given control",
  460. " character as-is, without a prefix.  USE THIS OPTION AT YOUR OWN RISK!",
  461. "\nSHOW CONTROL to see current settings.  SET CONTROL PREFIXED ALL is",
  462. "recommended for safety.  You can include multiple <code> values in one",
  463. "command, separated by spaces.",
  464. "" };
  465. #endif /* CK_SPEED */
  466.  
  467. #ifndef NODIAL
  468. static char *hmxydial[] = {
  469. "SET DIAL DIAL-COMMAND [ text ]",
  470. "The 'text' replaces C-Kermit's built-in modem dialing command.  It must",
  471. "include '%s' (percent s) as a place-holder for the telephone numbers",
  472. "given in your DIAL commands.  If the 'text' is omitted, C-Kermit uses its",
  473. "built-in modem-specific dialing command.\n",
  474. "SET DIAL DIRECTORY filename",
  475. "Name of dialing directory file.  Type HELP DIAL for further info.\n",
  476. "SET DIAL DISPLAY {ON, OFF}",
  477. "Whether to display dialing progress on the screen.\n",
  478. "SET DIAL HANGUP {ON, OFF}",
  479. "Whether the DIAL command should hang up the phone before dialing.\n",
  480. "SET DIAL INIT-STRING [ text ]",
  481. "The 'text' is a replacement for C-Kermit's built-in initialization command",
  482. "for the modem.  If 'text' omitted, use built-in initialization command.\n",
  483. "SET DIAL KERMIT-SPOOF {ON, OFF}",
  484. "If the selected modem type supports the Kermit protocol directly,",
  485. "use this command to turn its Kermit protocol function on or off.\n",
  486. "SET DIAL MODEM-HANGUP {ON, OFF}",
  487. "Governs how the HANGUP, <esc>H, and similar operations work when you have",
  488. "a dialed connection (in local mode, and a specific modem type is set).",
  489. "ON means to use modem commands to hang up the phone, e.g. ATH0.",
  490. "OFF means to hang up by attempting to turn off the DTR signal.",
  491. "ON is not necessarily supported for all modem types.\n",
  492. "SET DIAL MNP-ENABLE {ON, OFF}",
  493. "Enable or disable MNP negotiation by the modem.\n",
  494. "SET DIAL PREFIX [ text ]",
  495. "Establish a prefix to be applied to the phone numbers given in the DIAL",
  496. "command or read from the dialing directory.\n",
  497. "SET DIAL SPEED-MATCHING {ON, OFF}",
  498. "ON (the default) means that C-Kermit changes its serial interface speed to",
  499. "agree with the speed reported by the modem's CONNECT message, if any.  OFF",
  500. "means that C-Kermit should not change its interface speed.\n",
  501. "SET DIAL TIMEOUT number",
  502. "How many seconds to wait for a dialed call to complete.  Use this command",
  503. "to override the DIAL command's automatic timeout calculation.  A value",
  504. "of 0 turns off this feature and returns to Kermit's automatic dial",
  505. "timeout calculation.\n",
  506. "Also see DIAL and SET MODEM.  Use SHOW DIAL to display dial-related",
  507. "settings.\n",
  508. "" } ;
  509. #endif /* NODIAL */
  510.  
  511. static char *hmxyflo[] = { "Syntax: SET FLOW value\n",
  512. "Type of flow control to use during file transfer and CONNECT mode.",
  513. "Choices: KEEP (don't change device's current setting), XON/XOFF (software",
  514. "flow control, the default), NONE (no flow control at all), and possibly",
  515. "others including RTS/CTS (hardware) depending on the capabilities of your",
  516. "computer and operating system.  Type SET FLOW ? for a list.",
  517. ""};
  518.  
  519. static char *hmxyf[] = { "Syntax: SET FILE parameter value",
  520. "Parameters:\n",
  521. "TYPE: How file contents are to be treated during file transfer.",
  522. "TYPE is normally TEXT, with conversion of record format and character set.",
  523. "BINARY means to do no conversion.  Use BINARY for executable programs or",
  524. "binary data.  Example: SET FILE TYPE BINARY.\n",
  525.  
  526. #ifdef VMS
  527. "For VAX/VMS, you may include an optional record-format after the word",
  528. "BINARY.  This may be FIXED (the default) or UNDEFINED.",
  529. "Two additional VMS file types are also supported: IMAGE and LABELED.  IMAGE",
  530. "means raw block i/o, no interference from RMS, and applies to file transmis-",
  531. "sion only.  LABELED means to send or interpret RMS attributes with the file.",
  532. "\n",
  533. #endif /* VMS */
  534.  
  535. "BYTESIZE { 7, 8 }: normally 8.  If 7, truncate the 8th bit of all file \
  536. bytes.\n",
  537.  
  538. #ifndef NOCSETS
  539. "CHARACTER-SET: tells the encoding of the local file, ASCII by default.",
  540. "The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646",
  541. "national character sets.  LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1",
  542. "for Western European languages.",
  543. "NEXT is the 8-bit character set of the NeXT workstation.",
  544. "The CPnnn sets are for IBM PCs.  MACINTOSH-LATIN is for the Macintosh.",
  545. #ifndef NOLATIN2
  546. "LATIN2 is ISO 8859-2 for Eastern European languages that are written with",
  547. "Roman letters.",
  548. #endif /* NOLATIN2 */
  549. #ifdef CYRILLIC
  550. "KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.",
  551. "SHORT-KOI is a 7-bit ASCII coding for Cyrillic.",
  552. #endif /* CYRILLIC */
  553. #ifdef HEBREW
  554. "HEBREW-ISO is ISO 8859-8 Latin/Cyrillic.  CP862 is the Hebrew PC code page.",
  555. "HEBREW-7 is like ASCII with the lowercase letters replaced by Hebrew.",
  556. #endif /* HEBREW */
  557. #ifdef KANJI
  558. "JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI are Japanese",
  559. "Kanji character sets.",
  560. #endif /* KANJI */
  561. "Type SET FILE CHAR ? for a complete list of file character sets.\n",
  562. #endif /* NOCSETS */
  563.  
  564. "INCOMPLETE - what to do with an incompletely received file: DISCARD",
  565. "(default), or KEEP.\n",
  566.  
  567. "NAMES are normally CONVERTED to 'common form' during transmission; LITERAL",
  568. "means use filenames literally (useful between like systems).\n",
  569.  
  570. "COLLISION tells what to do when a file arrives that has the same name as",
  571. "an existing file.  The options are:",
  572. "  BACKUP (default) - Rename the old file to a new, unique name and store",
  573. "    the incoming file under the name it was sent with.",
  574. "  OVERWRITE - Overwrite (replace) the existing file.",
  575. "  APPEND - Append the incoming file to the end of the existing file.",
  576. "  DISCARD - Refuse and/or discard the incoming file.",
  577. "  RENAME - Give the incoming file a unique name.",
  578. "  UPDATE - Accept the incoming file only if it is newer than the existing",
  579. "    file.",
  580. "Example: SET FILE COLLISION UPDATE\n",
  581.  
  582. #ifdef VMS
  583. "RECORD-LENGTH sets the record length for received files of type BINARY. Use",
  584. "this to receive VMS BACKUP savesets or other fixed-format files. The default",
  585. "of 512 is suitable for executable (.EXE) files, etc.\n",
  586. "Example: SET FILE REC 8192\n",
  587. #endif /* VMS */
  588.  
  589. "SET FILE DISPLAY selects the format of the file transfer display for",
  590. "local-mode file transfer.  The choices are:",
  591. "  SERIAL (the default).  One dot is printed for every K bytes transferred.",
  592. "    This format works on any kind of terminal, even a hardcopy.",
  593. "  CRT.  Numbers are continuously updated on a single screen line.  This",
  594. "    format can be used on any video display terminal.",
  595. #ifdef CK_CURSES
  596. "  FULLSCREEN.  A fully formatted 24x80 screen showing lots of information.",
  597. "    This requires a video display terminal whose control sequences are",
  598. "    understood by Kermit.",
  599. #endif /* CK_CURSES */
  600. "  NONE.  No file transfer display at all.\n",
  601.  
  602. "WARNING.  SET FILE WARNING is superseded by the newer command, SET FILE",
  603. "COLLISION.  SET FILE WARNING ON is equivalent to SET FILE COLLISION RENAME",
  604. "and SET FILE WARNING OFF is equivalent to SET FILE COLLISION OVERWRITE.\n",
  605.  
  606. "" };
  607.  
  608. static char *hmxyhsh[] = { "Syntax: SET HANDSHAKE value\n",
  609. "Character to use for half duplex line turnaround handshake during file",
  610. "transfer.  C-Kermit waits for this character from the other computer before",
  611. "sending its next packet.  Default is NONE, others are XON, LF, BELL, ESC,",
  612. "etc.  SET HANDSHAKE CODE <n> lets you specify the numeric ASCII value of the",
  613. "handshake character.  Type SET HANDSH ? for a list.",
  614. "" };
  615.  
  616. #ifndef NOSERVER
  617. static char *hsetsrv[] = {"\
  618. SET SERVER DISPLAY {ON,OFF}",
  619. "Tell whether local-mode C-Kermit during server operation should put a",
  620. "file transfer display on the screen.  Default is OFF.\n",
  621. "SET SERVER TIMEOUT n",
  622. "Server command wait timeout interval, how often the C-Kermit server issues",
  623. "a NAK while waiting for a command packet.  Specify 0 for no NAKs at all.",
  624. "Default is 0.",
  625. "" };
  626. #endif /* NOSERVER */
  627.  
  628. static char *hmhrmt[] = { "\
  629. The REMOTE command is used to send file management instructions to a",
  630. "remote Kermit server.  There should already be a Kermit running in server",
  631. "mode on the other end of the currently selected line.  Type REMOTE ? to",
  632. "see a list of available remote commands.  Type HELP REMOTE x to get",
  633. "further information about a particular remote command 'x'.",
  634. "" } ;
  635.  
  636. #ifndef NOSPL
  637. static char *ifhlp[] = { "Syntax: IF [NOT] condition command\n",
  638. "If the condition is (is not) true, do the command.  Only one command may",
  639. "be given, and it must appear on the same line as the IF.  Conditions are:\n",
  640. "  SUCCESS    - the previous command succeeded",
  641. "  FAILURE    - the previous command failed",
  642. "  BACKGROUND - C-Kermit is running in the background",
  643. "  FOREGROUND - C-Kermit is running in the foreground\n",
  644. "  DEFINED variablename or macroname - The named variable or macro is defined",
  645. "  NUMERIC variable or constant      - The variable or constant is numeric",
  646. "  EXIST filename                    - The named file exists\n",
  647. "  COUNT   - subtract one from COUNT, execute the command if the result is",
  648. "            greater than zero (see SET COUNT)\n",
  649. "  EQUAL s1 s2 - s1 and s2 (character strings or variables) are equal",
  650. "  LLT s1 s2   - s1 is lexically (alphabetically) less than s2",
  651. "  LGT s1 s1   - s1 is lexically (alphabetically) greater than s2\n",
  652. "  = n1 n1 - n1 and n2 (numbers or variables containing numbers) are equal",
  653. "  < n1 n2 - n1 is arithmetically less than n2",
  654. "  > n1 n2 - n1 is arithmetically greater than n2\n",
  655. "The IF command may be followed on the next line by an ELSE command. Example:",
  656. "  IF < \\%x 10 ECHO It's less",
  657. "  ELSE echo It's not less\n",
  658. "See also XIF.",
  659. "" };
  660. #endif /* NOSPL */
  661.  
  662. #ifndef NOSPL
  663. static char *ifxhlp[] = { "\
  664. Syntax: XIF condition { commandlist } [ ELSE { commandlist } ]\n",
  665. "Extended IF command.  The conditions are the same as for IF (type HELP IF)",
  666. "but multiple comma-separated commands may be grouped within braces in both", 
  667. "the IF and ELSE parts.  The ELSE part, if any, must be on the same line as",
  668. "the XIF (or use dash for line continuation).  Example:\n",
  669. "  XIF equal \\%a YES { echo OK, goto begin } ELSE { echo Not OK, stop }",
  670. "" };
  671. #endif /* NOSPL */
  672.  
  673. #ifndef NOSPL
  674. static char *forhlp[] = { "\
  675. Syntax: FOR variablename initial-value final-value increment { commandlist }",
  676. "\nFOR loop.  Execute the comma-separated commands in the commandlist the",
  677. "number of times given by the initial value, final value and increment.",
  678. "Example:  FOR \\%i 10 1 -1 { pause 1, echo \\%i }", "" };
  679.  
  680. static char *whihlp[] = { "\
  681. Syntax: WHILE condition { commandlist }",
  682. "\nWHILE loop.  Execute the comma-separated commands in the bracketed",
  683. "commandlist while the condition is true.  Conditions are the same as for",
  684. "IF commands.",
  685. "" };
  686. #endif /* NOSPL */
  687.  
  688. #ifndef NOSPL
  689. static char *openhlp[] = {
  690. "Syntax:  OPEN mode filename\n",
  691. "For use with READ and WRITE commands.  Open the local file in the specified",
  692. "mode: READ, WRITE, or APPEND.  !READ and !WRITE mean to read from or write",
  693. "to a system command rather than a file.  Examples:\n",
  694. "  OPEN READ oofa.txt",
  695. "  OPEN !READ sort foo.bar",
  696. "" };
  697. #endif /* NOSPL */
  698.  
  699. #ifndef NOSPL
  700. static char *hxxaskq[] = {
  701. "Syntax:  ASKQ variablename prompt",
  702. "Example: ASKQ %p { Password:}\n",
  703. "Issues the prompt and defines the variable to be whatever you type in.",
  704. "The characters that you type do not echo on the screen.",
  705. "Use braces to preserve leading and/or trailing spaces in the prompt.",
  706. "To include a question mark, precede it by backslash (\\).","" };
  707. #endif /* NOSPL */
  708.  
  709. #ifndef NOSPL
  710. static char *hxxask[] = {
  711. "Syntax:  ASK variablename prompt",
  712. "Example: ASK %n { What is your name\\? }\n",
  713. "Issues the prompt and defines the variable to be whatever you type in.",
  714. "Use braces to preserve leading and/or trailing spaces in the prompt.",
  715. "To include a question mark, precede it by backslash (\\).","" };
  716. #endif /* NOSPL */
  717.  
  718. #ifndef NOSPL
  719. static char *hxxdef[] = {
  720. "Syntax: DEFINE name [ definition ]\n",
  721. "Defines a macro or variable.  Its value is the definition, taken literally.",
  722. "No expansion or evaluation of the definition is done.  Thus if the", 
  723. "definition includes any variable or function references, their names are",
  724. "included, rather than their values (compare with ASSIGN).  If the definition",
  725. "is omitted, then the named variable or macro is undefined.\n",
  726. "A typical macro definition looks like this:\n",
  727. "  DEFINE name command, command, command, ...\n",
  728. "for example:\n",
  729. "  DEFINE vax set parity even, set duplex full, set flow xon/xoff\n",
  730. "which defines a Kermit command macro called 'vax'.  The definition is a",
  731. "comma-separated list of Kermit commands.  Use the DO command to execute",
  732. "the macro, or just type its name, followed optionally by arguments.\n",
  733. "The definition of a variable can be anything at all, for example:\n",
  734. "  DEFINE \\%a Monday",
  735. "  DEFINE \\%b 3\n",
  736. "These variables can be used almost anywhere, for example:\n",
  737. "  ECHO Today is \\%a",
  738. "  SET BLOCK-CHECK \\%b",
  739. "" };
  740. #endif /* NOSPL */
  741.  
  742. #ifndef NOSPL
  743. static char *hxxass[] = {
  744. "Syntax:  ASSIGN variablename string.",
  745. "Example: ASSIGN \\%a My name is \\%b.\n",
  746. "Assigns the current value of the string to the variable (or macro).",
  747. "The definition string is fully evaluated before it is assigned, so that",
  748. "the values of any variables are contained are used, rather than their",
  749. "names.  Compare with DEFINE.  To illustrate the difference, try this:\n",
  750. "  DEFINE \\%a hello",
  751. "  DEFINE \\%x \\%a",
  752. "  ASSIGN \\%y \\%a",
  753. "  DEFINE \\%a goodbye",
  754. "  ECHO \\%x \\%y\n",
  755. "This will print 'goodbye hello'.", "" };
  756. #endif /* NOSPL */
  757.  
  758. #ifndef NOSPL
  759. static char *hxxdec[] = {
  760. "Syntax: DECREMENT variablename [ number ]\n",
  761. "Decrement (subtract one from) the value of a variable if the current value",
  762. "is numeric.  If the number argument is given, subtract that number instead.",
  763. "\nExamples: DECR \\%a, DECR \\%a 7, DECR \\%a \\%n", "" };
  764. #endif /* NOSPL */
  765.  
  766. #ifndef NOSPL
  767. static char *hxxinc[] = {
  768. "Syntax: INCREMENT variablename [ number ]\n",
  769. "Increment (add one to) the value of a variable if the current value is",
  770. "numeric.  If the number argument is given, add that number instead.\n",
  771. "Examples: INCR \\%a, INCR \\%a 7, INCR \\%a \\%n", "" };
  772. #endif /* NOSPL */
  773.  
  774. #ifdef SUNX25
  775. static char *hxxpad[] = {
  776. "Syntax: PAD command",
  777. "X.25 PAD commands:\n",
  778. "    PAD CLEAR     - Clear the virtual call",
  779. "    PAD STATUS    - Return the status of virtual call",
  780. "    PAD RESET     - Send a reset packet",
  781. "    PAD INTERRUPT - Send an interrupt packet",
  782. ""};
  783.  
  784. static char *hxyx25[] = {
  785. "Syntax: SET X.25 option { ON [ data ], OFF }\n",
  786. "X.25 call options:",
  787. "  CLOSED-USER-GROUP { ON index, OFF }",
  788. "    Enable or disable closed user group call, where index is the group",
  789. "    index, 0 to 99.",
  790. "  REVERSE-CHARGE { ON, OFF }",
  791. "    Tell whether you want to reverse the charges for the call.",
  792. "  CALL-USER-DATA { ON string, OFF }",
  793. "    Specify call user-data for the X.25 call.",
  794. ""};
  795. #endif /* SUNX25 */
  796.  
  797. static char *hxxpau[] = {
  798. "Syntax:  PAUSE [ number ]",
  799. "Example: PAUSE 3\n",
  800. "Do nothing for the specified number of seconds; if no number given, one",
  801. "second.  If interrupted from the keyboard, set FAILURE, otherwise SUCCESS.",
  802. "" };
  803.  
  804. static char *hxxmsl[] = {
  805. "Syntax:  MSLEEP [ number ]",
  806. "Example: MSLEEP 500\n",
  807. "Do nothing for the specified number of milliseconds; if no number given,",
  808. "100 milliseconds.","" };
  809.  
  810. #ifndef NOPUSH
  811. static char *hxxshe[] = {
  812. "Syntax: ! [ command ] or RUN [ command ] or PUSH [ command ]\n",
  813. "Give a command to the local operating system's command processor, and",
  814. "display the results on the screen.\n",
  815. "If the command is omitted, enter interactive mode; return to Kermit",
  816. "by exiting from the system's command parser.  The command is usually",
  817. "EXIT or QUIT or LOGOUT.",  "" };
  818. #endif /* NOPUSH */
  819.  
  820. #ifndef NOXMIT
  821. static char *hxxxmit[] = {
  822. "Syntax: TRANSMIT file\n",
  823. "The TRANSMIT command is used for sending single files to other computers",
  824. "that don't have Kermit.  Text files are sent a line at a time; binary files",
  825. "are sent a character at a time.  There is no guarantee that the other",
  826. "computer will receive the file correctly and completely.  Before you start",
  827. "the TRANSMIT command, you must put the other computer in data collection",
  828. "mode, for example by starting a text editor.  TRANSMIT may be interrupted by",
  829. "Ctrl-C.  Synonym: XMIT.",
  830. "" };
  831. #endif /* NOXMIT */
  832.  
  833. #ifndef NOCSETS
  834. static char *hxxxla[] = {
  835. "Syntax: TRANSLATE file1 cs1 cs2 [ file2 ]\n",
  836. "Translates file1 from the character set cs1 into the character set cs2",
  837. "and stores the result in file2.  The character sets can be any of",
  838. "C-Kermit's file character sets.  If file2 is omitted, the translation",
  839. "is displayed on the screen.  An appropriate intermediate character-set",
  840. "is chosen automatically, if necessary.",
  841. "Synonym: XLATE.  Example:\n",
  842. "TRANSLATE lasagna.lat latin1 italian lasagna.nrc",
  843. "" };
  844. #endif /* NOCSETS */
  845.  
  846. #ifndef NOSPL
  847. static char *hxxwai[] = {
  848. "Syntax:  WAIT number [modem-signal(s)]",
  849. "Example: WAIT 5 \\cd\\cts\n",
  850. "Waits up to the given number of seconds for all of the specified signals.",
  851. "Sets FAILURE if signals do not appear in given time or if interrupted by",
  852. "typing anything at the keyboard during the waiting period.\n",
  853. "Signals: \\cd = Carrier Detect, \\dsr = Dataset Ready, \\cts = Clear To Send",
  854. "Warning: This command does not work yet, signals are ignored.", "" };
  855. #endif /* NOSPL */
  856.  
  857. static char *hxxwri[] = {
  858. "Syntax: WRITE name text\n",
  859. "Writes the given text to the named log or file.  The text text may include",
  860. "backslash codes, and is not terminated by a newline unless you include the",
  861. "appropriate code.  The name parameter can be any of the following:\n",
  862. "  DEBUG-LOG",
  863. "  ERROR (standard error)",
  864. #ifndef NOSPL
  865. "  FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)",
  866. #endif /* NOSPL */
  867. "  PACKET-LOG",
  868. "  SCREEN (compare with ECHO)",
  869. "  SESSION-LOG",
  870. "  TRANSACTION-LOG", "" };
  871.  
  872. #ifndef NODIAL
  873. static char *hxxdial[] = { "Syntax:  DIAL phonenumber",
  874. "Example: DIAL 7654321\n",
  875. "Dial a number using an autodial modem.  First you must SET MODEM, then",
  876. "SET LINE, then SET SPEED.  Then give the DIAL command, including the phone",
  877. "number, for example:\n",
  878. "  DIAL 7654321\n",
  879. #ifdef NETCONN
  880. "If the modem is on a network modem server, SET HOST first, then SET MODEM,",
  881. "then DIAL.  See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED,",
  882. "and REDIAL.\n",
  883. #else
  884. "See also SET DIAL, SET MODEM, SET LINE, SET SPEED, REDIAL.\n",
  885. #endif /* NETCONN */
  886. "The 'phonenumber' can also the name of an entry from your dialing directory,",
  887. "which is a plain text file, one entry per line:\n",
  888. "  name  phonenumber  speed   parity   comments\n",
  889. "for example:\n",
  890. "  e-mail  765-4321   2400    even     My electronic mailbox\n",
  891. "The fields are separated by spaces, and all fields after the 'phonenumber'",
  892. "are optional.  If the speed or parity are present, they replace your current",
  893. "SET SPEED and SET PARITY settings.  Specify your dialing directory file with",
  894. "the SET DIAL DIRECTORY command.",
  895.  "" };
  896. #endif /* NODIAL */
  897.  
  898. #endif /* NOHELP */
  899.  
  900. /*  D O H L P  --  Give a help message  */
  901.  
  902. _PROTOTYP( int dohset, (int) );
  903.  
  904. int
  905. dohlp(xx) int xx; {
  906.     int x,y;
  907.  
  908.     debug(F101,"DOHELP xx","",xx);
  909.     if (xx < 0) return(xx);
  910.     switch (xx) {
  911.  
  912. #ifdef NOHELP
  913.  
  914. case XXHLP:
  915.     if ((x = cmcfm()) < 0)
  916.       return(x);
  917.     printf("%s, Copyright (C) 1985, 1993,",versio);
  918.     return(hmsga(tophlp));
  919.  
  920. #else /* help is available */
  921.  
  922. #ifndef NOSPL
  923. case XXASS:                /* assign */
  924.     return(hmsga(hxxass));
  925.  
  926. case XXASK:                /* ask */
  927.     return(hmsga(hxxask));
  928.  
  929. case XXASKQ:
  930.     return(hmsga(hxxaskq));
  931. #endif /* NOSPL */
  932.  
  933. case XXAPC:
  934.     return(hmsg("Syntax: APC text\n\
  935. Echoes the text in the form of a VT220/320/420 Application Program Command.\n\
  936. Use the APC command to send commands to MS-DOS Kermit 3.13 or later."));
  937.  
  938. #ifndef NOFRILLS
  939. case XXBUG:
  940.     return(hmsg("Describes how to report C-Kermit bugs."));
  941. #endif /* NOFRILLS */
  942.  
  943. case XXBYE:                /* bye */
  944.     return(hmsg(hmxxbye));
  945.  
  946. case XXCHK:                /* check */
  947.     return(hmsg("\
  948. Syntax: CHECK name\n\
  949. Checks to see if the named feature is included in this version of C-Kermit.\n\
  950. To list the features you can check, type \"check ?\"."));
  951.  
  952. #ifndef NOFRILLS
  953. case XXCLE:                /* clear */
  954.     return(hmsg("\
  955. Syntax: CLEAR [ { DEVICE, INPUT, BOTH } ]\n\
  956. Clears the communications device input buffer, the INPUT command buffer,\n\
  957. or both.  The default is BOTH."));
  958. #endif /* NOFRILLS */
  959.  
  960. case XXCLO:                /* close */
  961.     return(hmsga(hmxxclo));
  962.  
  963. case XXCOM:                /* comment */
  964.     return(hmsg("\
  965. Syntax: COMMENT text\n\
  966. Example: COMMENT - this is a comment.\n\n\
  967. Introduces a comment.  Beginning of command line only.  Commands may also\n\
  968. have trailing comments, introduced by ; or #."));
  969.  
  970. case XXCON:                /* connect */
  971.     hmsg(hmxxcon);
  972.     printf("Your escape character is Ctrl-%c (ASCII %d, %s)\r\n",
  973.        ctl(escape), escape, (escape == 127 ? "DEL" : ccntab[escape]));
  974.     return(0);
  975.  
  976. case XXCWD:                /* cd / cwd */
  977. #ifdef vms
  978.     return(hmsg("Syntax: CD [ directory or device:directory ]\n\
  979. Change Working Directory, equivalent to VMS SET DEFAULT command"));
  980. #else
  981. #ifdef datageneral
  982.     return(hmsg("Change Working Directory, equivalent to DG 'dir' command"));
  983. #else
  984. #ifdef OS2
  985.   return(hmsg("Change Working Directory, equivalent to OS/2 'chdir' command"));
  986. #else
  987.     return(hmsg("Syntax: CD [ directoryname ]\n\n\
  988. Change Working Directory, equivalent to UNIX cd command."));
  989. #endif /* OS2 */
  990. #endif /* datageneral */
  991. #endif /* vms */
  992.  
  993. #ifndef NOSPL
  994. case XXDCL:
  995.     return(hmsg("Syntax:  DECLARE arrayname[size]\n\
  996. Example: DECLARE \\&a[20]\n\n\
  997. Declares an array of the given size.  Array elements can be used just like\n\
  998. any other variables."));
  999.  
  1000. case XXDEF:                /* define */
  1001.     return(hmsga(hxxdef));
  1002. #endif /* NOSPL */
  1003.  
  1004. #ifndef NOFRILLS
  1005. case XXDEL:                /* delete */
  1006.     return(hmsg("Syntax: DELETE filespec\n\n\
  1007. Delete a local file or files.  RM is a synonym for DELETE."));
  1008. #endif /* NOFRILLS */
  1009.  
  1010. #ifndef NODIAL
  1011. case XXDIAL:                /* dial */
  1012.     return(hmsga(hxxdial));
  1013. #endif
  1014.  
  1015. case XXDIR:                /* directory */
  1016.     return(hmsg("Syntax: DIRECTORY [ filespec ]\n\
  1017. Display a directory listing of local files."));
  1018.  
  1019. #ifndef NOSERVER
  1020. #ifndef NOFRILLS
  1021. case XXDIS:
  1022.     return(hmsg("Syntax: DISABLE command\n\n\
  1023. Security for the C-Kermit server.  Prevent the client Kermit program from\n\
  1024. executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc."));
  1025. #endif /* NOFRILLS */
  1026. #endif /* NOSERVER */
  1027.  
  1028. #ifndef NOSPL
  1029. case XXDO:                /* do */
  1030.     return(hmsg("Syntax: [ DO ] macroname [ arguments ]\n\n\
  1031. Execute a macro that was defined by the DEFINE command.  The word DO\n\
  1032. can be omitted.  Trailing argument words, if any, are automatically\n\
  1033. assigned to the macro argument variables \\%1, \\%2, etc."));
  1034. #endif /* NOSPL */
  1035.  
  1036. #ifndef NOSPL
  1037. case XXDEC:
  1038.     return(hmsga(hxxdec));
  1039. #endif /* NOSPL */
  1040.  
  1041. case XXECH:                /* echo */
  1042.     return(hmsg("Syntax: ECHO text\n\
  1043. Display the text on the screen, followed by a newline.  The ECHO text may\n\
  1044. contain backslash codes.  Example: ECHO \\7Wake up!\\7")); 
  1045.  
  1046. #ifndef NOSERVER
  1047. #ifndef NOFRILLS
  1048. case XXENA:
  1049.     return(hmsg("Syntax: ENABLE capability\n\n\
  1050. For use with server mode.  Allow the client Kermit program access to the\n\
  1051. named capability, such as CD, DELETE, RECEIVE, etc.  Opposite of DISABLE."));
  1052. #endif /* NOFRILLS */
  1053. #endif /* NOSERVER */
  1054.  
  1055. #ifndef NOSPL
  1056. case XXEND:                /* end */
  1057.     return(hmsg("Syntax: END [ number [ message ] ]\n\
  1058. Exit from the current macro or TAKE file, back to wherever invoked from.\n\
  1059. Number is return code.  Message, if given, is printed."));
  1060. #endif /* NOSPL */
  1061.  
  1062. #ifndef NOFRILLS
  1063. case XXERR:                /* error */
  1064.     return(hmsg("Syntax: ERROR\n\
  1065. Send an Error packet to the other Kermit to get it out of packet mode."));
  1066. #endif /* NOFRILLS */
  1067.  
  1068. case XXEXI:                /* exit */
  1069. case XXQUI:
  1070.     return(hmsg("Syntax: QUIT (or EXIT)\n\
  1071. Exit from the Kermit program, closing all open files and devices."));
  1072.  
  1073. case XXFIN:
  1074.     return(hmsg("Syntax: FINISH\n\
  1075. Tell the remote Kermit server to shut down without logging out."));
  1076.  
  1077. #ifndef NOSPL
  1078. case XXFOR:
  1079.     return(hmsga(forhlp));
  1080. #endif /* NOSPL */
  1081.  
  1082. case XXGET:
  1083.     return(hmsg(hmxxget));
  1084.  
  1085. #ifndef NOSPL
  1086. #ifndef NOFRILLS
  1087.   case XXGOK:
  1088.     return(hmsg("Syntax: GETOK prompt\n\
  1089. Print the prompt, make user type 'yes', 'no', or 'ok', and set SUCCESS or\n\
  1090. FAILURE accordingly."));
  1091. #endif /* NOFRILLS */
  1092. #endif /* NOSPL */
  1093.  
  1094. #ifndef NOSPL
  1095. case XXGOTO:
  1096.     return(hmsg("Syntax: GOTO label\n\
  1097. In a TAKE file or macro, go to the given label.  A label is a word on the\n\
  1098. left margin that starts with a colon (:).  Example:\n\n\
  1099. :oofa\n\
  1100. echo Hello!\n\
  1101. goto oofa"));
  1102. #endif /* NOSPL */
  1103.  
  1104. case XXHAN:
  1105.     return(hmsg("Syntax: HANGUP\n\
  1106. Hang up the phone or network connection."));    
  1107.  
  1108. case XXHLP:
  1109. /*
  1110.   We get confirmation here, even though we do it again in hmsga(), to prevent
  1111.   the Copyright message from being printed prematurely.  This doesn't do any
  1112.   harm, because the first call to cmcfm() sets cmflgs to 1, making the second
  1113.   call return immediately.
  1114. */
  1115.     if ((x = cmcfm()) < 0)
  1116.       return(x);
  1117.     printf("%s, Copyright (C) 1985, 1993,",versio);
  1118.     return(hmsga(tophlp));
  1119.  
  1120. case XXINT:
  1121.     return(hmsg("Give a brief introduction to C-Kermit."));    
  1122.  
  1123. #ifndef NOSPL
  1124. case XXIF:
  1125.     return(hmsga(ifhlp));
  1126.  
  1127. case XXINC:
  1128.     return(hmsga(hxxinc));
  1129.  
  1130. case XXINP:
  1131.    return(hmsg("\
  1132. Syntax:  INPUT n [ text ]\n\
  1133. Example: INPUT 5 Login:\n\n\
  1134. Wait up to n seconds for the given text to arrive on the communication line.\n\
  1135. If no text, waits for any character.  For use in script programs with\n\
  1136. IF FAILURE and IF SUCCESS.  Also see SET INPUT."));
  1137. #endif /* NOSPL */
  1138.  
  1139. #ifndef NODIAL
  1140. case XXRED:
  1141.     return(hmsg("Redial the number given in the most recent DIAL commnd."));
  1142. #endif /* NODIAL */
  1143.  
  1144. #ifndef NOSPL
  1145. case XXREI:
  1146.     return(hmsg("Syntax: REINPUT n string\n\n\
  1147. Look for the string in the text that has recently been INPUT, set SUCCESS\n\
  1148. or FAILURE accordingly.  Timeout, n, must be specified but is ignored."));
  1149. #endif /* NOSPL */
  1150.  
  1151. #ifndef NOFRILLS
  1152. case XXREN:
  1153.     return(hmsg("Syntax: RENAME oldname newname\n\n\
  1154. Change the name of file 'oldname' to 'newname'."));
  1155. #endif /* NOFRILLS */
  1156.  
  1157. #ifndef NOSPL
  1158. case XXLBL:
  1159.     return(hmsg("\
  1160. Introduce a label, like :loop, for use with GOTO in TAKE files or macros.\n\
  1161. See GOTO."));
  1162. #endif /* NOSPL */
  1163.  
  1164. case XXLOG:
  1165.     return(hmsga(hmxxlg));
  1166.  
  1167. #ifndef NOSCRIPT
  1168. case XXLOGI:
  1169.     return(hmsga(hmxxlogi));
  1170. #endif
  1171.  
  1172. #ifndef NOFRILLS
  1173. case XXMAI:
  1174.     return(hmsg("Syntax: MAIL filename address\n\n\
  1175. Send the file to the remote Kermit, which must be in RECEIVE or SERVER mode,\n\
  1176. and request that the remote host deliver the file as electronic mail to the\n\
  1177. given address.  Example: MAIL BUG.TXT KERMIT@CUVMA"));
  1178. #endif /* NOFRILLS */
  1179.  
  1180. #ifndef NOMSEND
  1181. case XXMSE:
  1182.     return(hmsg(hmssmse));
  1183. #endif /* NOMSEND */
  1184.  
  1185. #ifndef NOSPL
  1186. case XXOPE:
  1187.     return(hmsga(openhlp));
  1188. #endif /* NOSPL */
  1189.  
  1190. case XXNEW:
  1191.     return(hmsg(
  1192. " Print news of new features since publication of \"Using C-Kermit\"."));
  1193.  
  1194. #ifndef NOSPL
  1195. case XXOUT:
  1196.     return(hmsg("Syntax: OUTPUT text\n\n\
  1197. Send the text out the currently selected line, as if you had typed it\n\
  1198. during CONNECT mode.  The text may contain backslash codes.  Example:\n\n\
  1199.   OUTPUT help\\13"));
  1200. #endif /* NOSPL */
  1201.  
  1202. #ifdef SUNX25
  1203. case XXPAD:
  1204.     return(hmsga(hxxpad));
  1205. #endif /* SUNX25 */
  1206.  
  1207. #ifndef NOSPL
  1208. case XXPAU:
  1209.     return(hmsga(hxxpau));
  1210.  
  1211. case XXMSL:
  1212.     return(hmsga(hxxmsl));
  1213. #endif /* NOSPL */
  1214.  
  1215. #ifdef TCPSOCKET
  1216. case XXPNG:
  1217.     return(hmsg("Syntax: PING [ IP-hostname-or-number ]\n\n\
  1218. Check if given IP network host is reachable.  Default host from most\n\
  1219. recent SET HOST or TELNET command.  Runs system PING program, if any."));
  1220. #endif /* TCPSOCKET */
  1221.  
  1222. #ifndef NOFRILLS
  1223. case XXPRI:
  1224.     return(hmsg("Syntax: PRINT file [ options ]\n\n\
  1225. Print the local file on a local printer with the given options."));
  1226. #endif /* NOFRILLS */
  1227.  
  1228. case XXPWD:
  1229.     return(hmsg("Syntax: PWD\n\
  1230. Print the name of the current working directory."));
  1231.  
  1232. #ifndef NOSPL
  1233. case XXREA:
  1234.     return(hmsg("Syntax: READ variablename\n\
  1235. Read a line from the currently open READ or !READ file into the variable\n\
  1236. (see OPEN)."));
  1237. #endif /* NOSPL */
  1238.  
  1239. case XXREC:
  1240.     return(hmsga(hmxxrc));
  1241.  
  1242. case XXREM:
  1243.     y = cmkey(remcmd,nrmt,"Remote command","",xxstring);
  1244.     return(dohrmt(y));
  1245.  
  1246. #ifndef NOSPL
  1247. case XXRET:
  1248.     return(hmsg("Syntax: RETURN [ value ]\n\
  1249. Return from a macro.  An optional return value can be given for use with\n\
  1250. with \\fexecute(macro), which allows macros to be used like functions."));
  1251. case XXSEN:
  1252.     return(hmsg(hmxxsen));
  1253. #endif /* NOSPL */
  1254.  
  1255. #ifndef NOSERVER
  1256. case XXSER:
  1257.     return(hmsg(hmxxser));
  1258. #endif /* NOSERVER */
  1259.  
  1260. #ifndef NOJC
  1261. case XXSUS:
  1262.     return(hmsg("Syntax: SUSPEND or Z\n\
  1263. Suspend Kermit.  Continue Kermit with the appropriate system command,\n\
  1264. such as fg."));
  1265. #endif /* NOJC */
  1266.  
  1267. case XXSET:
  1268.     y = cmkey(prmtab,nprm,"Parameter","",xxstring);
  1269.     debug(F101,"HELP SET y","",y);
  1270.     return(dohset(y));
  1271.  
  1272. #ifndef NOPUSH
  1273. case XXSHE:
  1274.     return(hmsga(hxxshe));
  1275. #endif /* NOPUSH */
  1276.  
  1277. #ifndef NOSHOW
  1278. case XXSHO:
  1279.     return(hmsg("\
  1280. Display current values of various items (SET parameters, variables, etc).\n\
  1281. Type SHOW ? for a list of categories."));
  1282. #endif /* NOSHOW */
  1283.  
  1284. case XXSPA:
  1285. #ifdef datageneral
  1286.     return(hmsg("\
  1287. Display disk usage in current device, directory,\n\
  1288. or return space for a specified device, directory."));
  1289. #else
  1290.     return(hmsg("Syntax: SPACE\n\
  1291. Display disk usage in current device and/or directory"));
  1292. #endif
  1293.  
  1294. case XXSTA:
  1295.     return(hmsg("Syntax: STATISTICS\n\
  1296. Display statistics about most recent file transfer"));
  1297.  
  1298. #ifndef NOSPL
  1299. case XXSTO:
  1300.     return(hmsg("Syntax: STOP [ number [ message ] ]\n\
  1301. Stop executing the current macro or TAKE file and return immediately to\n\
  1302. the C-Kermit prompt.  Number is a return code.  Message printed if given."));
  1303. #endif /* NOSPL */
  1304.  
  1305. case XXTAK:
  1306.     return(hmsg("Syntax: TAKE filename\n\
  1307. Take Kermit commands from the named file.  Kermit command files may\n\
  1308. themselves contain TAKE commands, up to a reasonable depth of nesting."));
  1309.  
  1310. #ifdef NETCONN
  1311. case XXTEL:
  1312.     return(hmsg("Syntax: TELNET [ host ]\n\
  1313. Equivalent to SET HOST host, followed by CONNECT.  If hostname omitted,\n\
  1314. previous connection (if any) is resumed."));
  1315. #endif /* NETCONN */
  1316.  
  1317.  
  1318. #ifndef NOXMIT
  1319. case XXTRA:
  1320.     return(hmsga(hxxxmit));
  1321. #endif /* NOXMIT */
  1322.  
  1323. #ifndef NOFRILLS
  1324. case XXTYP:
  1325.     return(hmsg("Syntax: TYPE file\n\
  1326. Display a file on the screen.  Pauses if you type Ctrl-S, resumes if you\n\
  1327. type Ctrl-Q, returns immediately to C-Kermit prompt if you type Ctrl-C."
  1328. ));
  1329. #endif /* NOFRILLS */
  1330.  
  1331. #ifndef NOSPL
  1332. case XXWHI:
  1333.     return(hmsga(whihlp));
  1334. #endif /* NOSPL */
  1335.  
  1336. #ifndef NOCSETS
  1337. case XXXLA:
  1338.     return(hmsga(hxxxla));
  1339. #endif /* NOCSETS */
  1340.  
  1341. case XXVER:
  1342.     return(hmsg("Syntax: VERSION\nDisplays the program version number."));
  1343.  
  1344. #ifndef NOSPL
  1345. case XXWAI:
  1346.     return(hmsga(hxxwai));
  1347. #endif /* NOSPL */
  1348.  
  1349. #ifndef NOFRILLS
  1350. case XXWHO:
  1351.     return(hmsg("Syntax: WHO [ user ]\nDisplays info about the user."));
  1352.  
  1353. case XXWRI:
  1354.     return(hmsga(hxxwri));
  1355. #endif /* NOFRILLS */
  1356.  
  1357. #ifndef NOSPL
  1358. case XXIFX:
  1359.     return(hmsga(ifxhlp));
  1360. #endif /* NOSPL */
  1361.  
  1362. #endif /* NOHELP */
  1363.  
  1364. default:
  1365.     if ((x = cmcfm()) < 0) return(x);
  1366.     printf("Help not available - %s\n",cmdbuf);
  1367.     break;
  1368.     }
  1369.     return(success = 0);
  1370. }
  1371.  
  1372. #ifdef NOHELP 
  1373.  
  1374. int                    /* Print an array of lines, */
  1375. hmsga(s) char *s[]; {            /* cheap version. */
  1376.     int i;
  1377.     if ((i = cmcfm()) < 0) return(i);
  1378.     printf("\n");            /* Start off with a blank line */
  1379.     for (i = 0; *s[i]; i++) {        /* Print each line. */
  1380.     printf("%s\n",s[i]);
  1381.     }
  1382.     printf("\n");
  1383.     return(0);
  1384. }
  1385.  
  1386. #else
  1387.  
  1388. int                    /* Print an array of lines, */
  1389. hmsga(s) char *s[]; {            /* pausing at end of each screen. */
  1390.     int x, y, i, j, k, n;
  1391.     if ((x = cmcfm()) < 0) return(x);
  1392.  
  1393.     printf("\n");            /* Start off with a blank line */
  1394.     n = 1;                /* Line counter */
  1395.     for (i = 0; *s[i]; i++) {
  1396.     printf("%s\n",s[i]);        /* Print a line. */
  1397.         y = (int)strlen(s[i]);
  1398.         k = 1;
  1399.         for (j = 0; j < y; j++)        /* See how many newlines were */
  1400.           if (s[i][j] == '\n') k++;    /* in the string... */
  1401.         n += k;
  1402.     if (n > 21)            /* After a screenful, give them */
  1403.           if (!askmore()) return(-9);
  1404.           else n = 0;
  1405.     }
  1406.     printf("\n");
  1407.     return(0);
  1408. }
  1409.  
  1410. /*  H M S G  --  Get confirmation, then print the given message  */
  1411.  
  1412. int
  1413. hmsg(s) char *s; {
  1414.     int x;
  1415.     if ((x = cmcfm()) < 0) return(x);
  1416.     printf("\n%s\n\n",s);
  1417.     return(0);
  1418. }
  1419.  
  1420. #ifndef NOXMIT
  1421. static char *hsetxmit[] = {
  1422. "Syntax: SET TRANSMIT parameter value\n",
  1423. "Controls the behavior of the TRANSMIT command, used for uploading files",
  1424. "to computers that don't have Kermit programs.  Parameters are:\n",
  1425. "ECHO ON/OFF:     Whether to echo text as it is being transmitted.",
  1426. "EOF text:        Text to send after end of file is reached.",
  1427. "FILL number:     ASCII value of character to insert into blank lines.",
  1428. "LINEFEED ON/OFF: Transmit LF as well as CR at the end of each line.",
  1429. "                 Normally, only CR is sent.",
  1430. "LOCKING-SHIFT ON/OFF: Whether to use SO/SI for transmitting 8-bit data",
  1431. "                 when PARITY is not NONE.",
  1432. "PAUSE number:    How many milliseconds to pause after transmitting each line",
  1433. "                 (text mode), or each character (binary mode).",
  1434. "PROMPT number:   ASCII value of character to look for from host before",
  1435. "                 sending next line, normally LF (10).",
  1436. "Synonym: SET XMIT.",
  1437. "" };
  1438. #endif /* NOXMIT */
  1439.  
  1440. static char *hsetbkg[] = {
  1441. "Syntax: SET BACKGROUND { OFF, ON }\n",
  1442. "SET BACKGROUND OFF forces prompts and messages to appear on your screen",
  1443. "even though Kermit thinks it is running in the background.", "" };
  1444.  
  1445. #ifdef DYNAMIC
  1446. static char *hsetbuf[] = {
  1447. "Syntax: SET BUFFERS n1 n2\n",
  1448. "Change the overall amount of memory allocated for SEND and RECEIVE packet",
  1449. "buffers, respectively.  Bigger numbers let you have longer packets and more",
  1450. "window slots", "" };
  1451. #endif /* DYNAMIC */
  1452.  
  1453. static char *hsetcmd[] = {
  1454. "Syntax: SET COMMAND BYTESIZE { 7, 8 }\n",
  1455. "SET COMMAND BYTE 8 allows you to use an 8-bit (international) character set",
  1456. "in the commands you type at the C-Kermit> prompt.  7 is the default.", "" };
  1457.  
  1458. static char *hsetcar[] = {
  1459. "Syntax: SET CARRIER ON, AUTO, or OFF\n",
  1460. "Attempts to control treatment of carrier on the communication device.",
  1461. "ON means that carrier is required at all times except during the DIAL",
  1462. "command.  OFF means that carrier is never required.  AUTO (the default)",
  1463. "means that carrier is required only during CONNECT.", "" };
  1464.  
  1465. static char *hsetat[] = {
  1466. "Syntax: SET ATTRIBUTES name ON or OFF\n",
  1467. "Use this command to enable (ON) or disable (OFF) the transmission of",
  1468. "selected file attributes along with each file, and to handle or ignore",
  1469. "selected incoming file attributes, including:\n",
  1470. #ifndef NOCSETS
  1471. "  CHARACTER-SET:  The transfer character set for text files",
  1472. #endif /* NOCSETS */
  1473. "  DATE:           The file's creation date",
  1474. "  DISPOSITION:    Unusual things to do with the file, like MAIL or PRINT",
  1475. "  LENGTH:         The file's length",
  1476. "  SYSTEM-ID:      Machine/Operating system of origin",
  1477. "  TYPE:           The file's type (text or binary)\n",
  1478. "You can also specify ALL to select all of them.  Examples:\n",
  1479. "  SET ATTR DATE OFF\n  SET ATTR LENGTH ON\n  SET ATTR ALL OFF", ""
  1480. };
  1481.  
  1482. #ifndef NOSPL
  1483. static char *hxxinp[] = {
  1484. "Syntax: SET INPUT parameter value\n",
  1485. "The SET INPUT command controls the behavior of the INPUT command:\n",
  1486. "SET INPUT CASE { IGNORE, OBSERVE }",
  1487. "Tells whether alphabetic case is to be significant in string comparisons.",
  1488. "This setting is local to the current macro or command file, and is inherited",
  1489. "by subordinate macros and take files.\n",
  1490. "SET INPUT ECHO { ON, OFF }",
  1491. "Tells whether to display arriving characters read by INPUT on the screen.\n",
  1492. "SET INPUT SILENCE <number>",
  1493. "The maximum number to seconds of silence (no input at all) before the INPUT",
  1494. "command times out, 0 for no maximum.\n",
  1495. "SET INPUT TIMEOUT-ACTION { PROCEED, QUIT }",
  1496. "Tells whether to proceed or quit from a script program if an INPUT command",
  1497. "fails.  PROCEED (default) allows use of IF SUCCESS and IF FAILURE commands.",
  1498. "This setting is local to the current macro or command file, and is inherited",
  1499. "by subordinate macros and take files.",
  1500. "" };
  1501. #endif /* NOSPL */
  1502.  
  1503. static char *hxytak[] = {
  1504. "Syntax: SET TAKE parameter value\n",
  1505. "Controls behavior of TAKE command.\n",
  1506. "SET TAKE ECHO { ON, OFF } tells whether commands read from a TAKE file",
  1507. "should be displayed on the screen.\n",
  1508. "SET TAKE ERROR { ON, OFF } tells whether a TAKE command file should be",
  1509. "automatically terminated when a command fails.  This setting is local to",
  1510. "the current command file, and inherited by subordinate command files.",
  1511.  "" };
  1512.  
  1513. static char *hxyterm[] = {
  1514. "Syntax: SET TERMINAL parameter value\n",
  1515. #ifdef OS2
  1516. "SET TERMINAL ANSWERBACK { OFF, ON }",
  1517. "disables/enables the ENQ/Answerback sequence (\"OS/2 C-Kermit\").\n",
  1518. "SET TERMINAL ARROW-KEYS { APPLICATION, CURSOR }",
  1519. "sets the mode for the arrow keys during VT terminal emulation.\n", 
  1520. #endif /* OS2 */
  1521. "SET TERMINAL BYTESIZE 7 or 8, to use 7- or 8-bit terminal characters",
  1522. "between C-Kermit and the remote computer or service during CONNECT.\n",
  1523. #ifndef NOCSETS
  1524. "SET TERMINAL CHARACTER-SET <remote-cs> [ <local-cs> ] to specify the",
  1525. "character set used by the remote host, <remote-cs>, and the character",
  1526. "set used by C-Kermit locally, <local-cs>.  If you don't specify the",
  1527. "local character set, the current FILE CHARACTER-SET is used.  When you",
  1528. "specify two different character sets, C-Kermit translates between them",
  1529. "during CONNECT.  By default, both character sets are TRANSPARENT.\n",
  1530. #endif /* NOCSETS */
  1531. #ifdef OS2
  1532. "SET TERMINAL COLOR <screenpart> <foreground> <background>, to set",
  1533. "the colors of the terminal emulation screen. <screenpart> may be one",
  1534. "of NORMAL, REVERSE, UNDERLINED, STATUS and HELP. <foreground> and",
  1535. "<background> may be one of BLACK, BLUE, GREEN, CYAN, RED, MAGENTA,",
  1536. "BROWN, LGRAY, DGRAY, LBLUE, LGREEN, LCYAN, LRED, LMAGENTA, YELLOW",
  1537. "or WHITE.  The L prefix for the color names means Light.\n",
  1538. #endif /* OS2 */
  1539. "SET TERMINAL CR-DISPLAY { CRLF, NORMAL } to specify how incoming",
  1540. "carriage return characters are to be displayed on your screen.\n",
  1541. "SET TERMINAL ECHO { LOCAL, REMOTE } to specify which side does the",
  1542. "echoing during terminal connection.\n",
  1543. #ifdef OS2
  1544. "SET TERMINAL KEYPAD-MODE { APPLICATION, NUMERIC } to specify the keypad",
  1545. "mode for VT terminal emulation.\n",
  1546. #endif /* OS2 */
  1547. "SET TERMINAL LOCKING-SHIFT { OFF, ON } tells C-Kermit whether to use",
  1548. "Shift-In/Shift-Out (Ctrl-O and Ctrl-N) to switch between 7-bit and 8-bit",
  1549. "characters during CONNECT.  OFF by default.\n",
  1550. "SET TERMINAL NEWLINE-MODE { OFF, ON } tells whether to send CRLF when you",
  1551. "type CR during CONNECT mode.\n",
  1552. #ifdef OS2
  1553. "SET TERMINAL TYPE { VT102, VT52 } to select which terminal to emulate.\n",
  1554. "SET TERMINAL WRAP { OFF, ON } to tell whether the VT terminal emulator",
  1555. "should automatically wrap long lines on your screen.\n",
  1556. #endif /* OS2 */
  1557. "Type SHOW TERMINAL to see current terminal settings.",
  1558. "" };
  1559.  
  1560. #ifdef NETCONN
  1561. static char *hxyhost[] = {
  1562. "Syntax:  SET HOST hostname-or-number\n",
  1563. "Select a network host.  Use this command instead of SET LINE.",
  1564. "After SET HOST give the host name or number.  TCP/IP Examples:\n",
  1565. "  SET HOST watsun.cc.columbia.edu",
  1566. "  SET HOST 128.59.39.2",
  1567. "" };
  1568.  
  1569. #ifdef TNCODE
  1570. static char *hxytel[] = {
  1571. "Syntax: SET TELNET parameter value\n",
  1572. "For TCP/IP SET HOST and TELNET connections:\n",
  1573. "SET TELNET ECHO { LOCAL, REMOTE }",
  1574. "  C-Kermit's initial echoing state for TELNET connections, LOCAL by default.",
  1575. "  After the connection is made, TELNET negotiations determine the echoing",
  1576. "  state.",
  1577. "SET TELNET NEWLINE-MODE { OFF, ON }",
  1578. "  ON (the default) means send CRLF when user types CR.",
  1579. "  OFF means send CR alone.",
  1580. "SET TELNET TERMINAL-TYPE name",
  1581. "  The terminal type to send to the remote TELNET host.  If none is given,",
  1582. "  your local terminal type is sent.\n",
  1583. "Type SHOW NETWORK to see the current values of these parameters.",
  1584. "" };
  1585. #endif /* TNCODE */
  1586.  
  1587. static char *hxynet[] = {
  1588. "Syntax: SET NETWORK network-type\n",
  1589. "Select the type of network to be used with SET HOST connections:\n",
  1590. #ifdef TCPSOCKET
  1591. "  SET NETWORK TCP/IP",
  1592. #endif /* TCPSOCKET */
  1593. #ifdef SUNX25
  1594. "  SET NETWORK X.25",
  1595. #endif /* SUNX25 */
  1596. #ifdef DECNET
  1597. "  SET NETWORK DECNET",
  1598. #endif /* DECNET */
  1599. ""};
  1600. #endif /* NETCONN */
  1601.  
  1602. #ifndef NOSPL
  1603. static char *hxymacr[] = {
  1604. "Syntax: SET MACRO parameter value\n",
  1605. "Controls the behavior of macros.\n",
  1606. "SET MACRO ECHO { ON, OFF } tells whether commands executed from a macro",
  1607. "definition should be displayed on the screen.\n",
  1608. "SET MACRO ERROR { ON, OFF } tells whether a macro should be automatically",
  1609. "terminated upon a command error.  This setting is local to the current",
  1610. "macro, and inherited by subordinate macros.",
  1611. "" };
  1612. #endif /* NOSPL */
  1613.  
  1614. #ifndef NODIAL
  1615. static char *hxymodm[] = {
  1616. "Syntax: SET MODEM-DIALER name\n",
  1617. "Type of modem for dialing remote connections.  Selects the dialing protocol,",
  1618. #ifdef MINIDIAL
  1619. "such as HAYES, to be used by the DIAL command.  Several dialing protocols",
  1620. #else
  1621. "such as HAYES, to be used by the DIAL command.  Many modem dialing protocols",
  1622. #endif /* MINIDIAL */
  1623. "are supported; type SET MODEM ? for a list.  DIRECT or NONE means a direct",
  1624. "connection, with no modem at all.  Also see HELP DIAL, HELP SET CARRIER.",
  1625. "" };
  1626. #endif /* NODIAL */
  1627.  
  1628. static char *hmxyprm[] = {
  1629. "Syntax: SET PROMPT [ text ]\n",
  1630. #ifdef MAC
  1631. "Prompt text for this program, normally 'Mac-Kermit>'.  May contain backslash",
  1632. #else
  1633. "Prompt text for this program, normally 'C-Kermit>'.  May contain backslash",
  1634. #endif /* MAC */
  1635. "codes for special effects.  Surround by { } to preserve leading or trailing",
  1636. #ifdef MAC
  1637. "spaces.  If text omitted, prompt reverts to Mac-Kermit>.  Prompt can include",
  1638. #else
  1639. "spaces.  If text omitted, prompt reverts to C-Kermit>.  Prompt can include",
  1640. #endif /* MAC */
  1641. "variables like \\v(dir) or \\v(time) to show current directory or time.",
  1642. "" };
  1643.  
  1644. static char *hxywind[] = {
  1645. "Syntax: SET WINDOW-SIZE number\n",
  1646. "Specify number of window slots for sliding windows, the number of packets",
  1647. "that can be transmitted before pausing for acknowledgement.  The default",
  1648. "is one, the maximum is 31.  Increased window size may result in reduced",
  1649. "maximum packet length.  Use sliding windows for improved efficiency on",
  1650. "connections with long delays.  A full duplex connection is required.",
  1651. "" };
  1652.  
  1653. static char *hxyrpt[] = {
  1654. "Syntax: SET REPEAT { COUNTS { ON, OFF }, PREFIX <code> }\n",
  1655. "SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF.",
  1656. " The default is ON.",
  1657. "SET REPEAT PREFIX <code> sets the repeat-count prefix character to the",
  1658. " given code.  The default is 126 (tilde).",
  1659. "" };
  1660.  
  1661. static char *hxyrcv[] = { 
  1662. "Syntax: SET RECEIVE parameter value\n",
  1663. "Specify parameters for inbound packets:\n",
  1664. "CONTROL-PREFIX number",
  1665. " ASCII value of prefix character used for quoting control characters in",
  1666. " packets that C-Kermit receives, normally 35 (number sign).  Don't change",
  1667. " this unless something is wrong with the other Kermit program.",
  1668. "END-OF-PACKET number",
  1669. " ASCII value of control character that terminates incoming packets,",
  1670. " normally 13 (carriage return).",
  1671. "PACKET-LENGTH number",
  1672. " Maximum length packet the other Kermit should send.",
  1673. "PADDING number",
  1674. " Number of prepacket padding characters to ask for (normally 0).",
  1675. "PAD-CHARACTER number",
  1676. " ASCII value of control character to use for padding (normally 0).",
  1677. "START-OF-PACKET number",
  1678. " ASCII value of character that marks start of inbound packet.",
  1679. "TIMEOUT number",
  1680. " Number of seconds other Kermit should wait for a packet before sending",
  1681. " NAK or retransmitting.",
  1682. "" };
  1683.  
  1684. static char *hxysnd[] = {
  1685. "Syntax: SET SEND parameter value\n",
  1686. "Specify parameters for outbound packets.  This command should be used only",
  1687. "to override the normal negotiated parameters and is rarely needed:\n",
  1688. "CONTROL-PREFIX number",
  1689. " ASCII value of prefix character used for quoting control characters in",
  1690. " packets that C-Kermit sends, normally 35 (number sign).",
  1691. "END-OF-PACKET number",
  1692. " ASCII value of control character to terminate an outbound packet,",
  1693. " normally 13 (carriage return).",
  1694. "PACKET-LENGTH number",
  1695. " Maximum length packet to send, even if other Kermit asks for longer ones.",
  1696. "PADDING number",
  1697. " Number of prepacket padding characters to send.",
  1698. "PAD-CHARACTER number",
  1699. " ASCII value of control character to use for padding.",
  1700. "START-OF-PACKET number",
  1701. " ASCII value of character to mark start of outbound packet.",
  1702. "TIMEOUT number",
  1703. " Number of seconds to wait for a packet before sending NAK or",
  1704. " retransmitting.",
  1705. "" };
  1706.  
  1707. static char *hxyxfer[] = {
  1708. "Synonym: SET XFER\n",
  1709. #ifdef XFRCAN
  1710. "Syntax: SET TRANSFER CANCELLATION { OFF, ON [ <code> [ <number> ] ]\n",
  1711. "OFF disables remote-mode packet-mode cancellation from the keyboard.",
  1712. "ON enables it.  The optional <code> is the control character to use for",
  1713. "cancellation; the optional <number> is how many consecutive occurrences",
  1714. "of the given control character are required for cancellation.",
  1715. #endif /* XFRCAN */
  1716. #ifndef NOCSETS
  1717. "\nSyntax: SET TRANSFER CHARACTER-SET name\n",
  1718. "Select the character set used to represent textual data in Kermit packets.",
  1719. "Text characters are translated to/from the FILE CHARACTER-SET.  Choices:\n",
  1720. " TRANSPARENT (no translation, the default)",
  1721. " ASCII",
  1722. " LATIN1 (ISO 8859-1 Latin Alphabet 1)",
  1723. #ifndef NOLATIN2
  1724. " LATIN2 (ISO 8859-2 Latin Alphabet 2)",
  1725. #endif /* NOLATIN2 */
  1726. #ifdef CYRILLIC
  1727. " CYRILLIC-ISO (ISO 8859-5 Latin/Cyrillic)",
  1728. #endif /* CYRILLIC */
  1729. #ifdef HEBREW
  1730. " HEBREW-ISO (ISO 8859-8 Latin/Hebrew)",
  1731. #endif /* HEBREW */
  1732. #ifdef KANJI
  1733. " JAPANESE-EUC (JIS X 0208 Kanji + Roman and Katakana)\n",
  1734. #endif /* KANJI */
  1735. #endif /* NOCSETS */
  1736. "\nSyntax: SET TRANSFER LOCKING-SHIFT { OFF, ON, FORCED }\n",
  1737. "Tell whether locking-shift protocol should be used during file transfer",
  1738. "to achieve 8-bit transparency on a 7-bit connection.  ON means to request",
  1739. "its use if PARITY is not NONE and to use it if the other Kermit agrees,",
  1740. "OFF means not to use it, FORCED means to use it even if the other Kermit",
  1741. "does not agree.",
  1742. "" };
  1743.  
  1744. /*  D O H S E T  --  Give help for SET command  */
  1745.  
  1746. int
  1747. dohset(xx) int xx; {
  1748.     int x;
  1749.  
  1750.     if (xx == -3) return(hmsga(hmhset));
  1751.     if (xx < 0) return(xx);
  1752.     if ((x = cmcfm()) < 0) return(x);
  1753.     switch (xx) {
  1754.  
  1755. case XYATTR:
  1756.     return(hmsga(hsetat));
  1757.  
  1758. case XYBACK:
  1759.     return(hmsga(hsetbkg));
  1760.  
  1761. #ifdef DYNAMIC
  1762. case XYBUF:
  1763.     return(hmsga(hsetbuf));
  1764. #endif /* DYNAMIC */
  1765.  
  1766. case XYCARR:
  1767.     return(hmsga(hsetcar));
  1768.  
  1769. #ifndef NOSPL
  1770. case XYCASE:
  1771.     return(hmsg("Syntax: SET CASE { ON, OFF }\n\
  1772. Tells whether alphabetic case is significant in string comparisons\n\
  1773. done by INPUT, IF, and other commands.  This setting is local to the\n\
  1774. current macro or command file, and inherited by subordinates."));
  1775.  
  1776. #endif /* NOSPL */
  1777.  
  1778. case XYCMD:
  1779.     return(hmsga(hsetcmd));
  1780.  
  1781. case XYIFD:
  1782.     return(hmsg("Syntax: SET INCOMPLETE { DISCARD, KEEP }\n\
  1783. Discard or Keep incompletely received files, default is DISCARD."));
  1784.  
  1785. #ifndef NOSPL
  1786. case XYINPU:
  1787.     return(hmsga(hxxinp));
  1788. #endif /* NOSPL */
  1789.  
  1790. case XYCHKT:
  1791.     return(hmsga(hmxychkt));
  1792.  
  1793. #ifndef NOSPL
  1794. case XYCOUN:
  1795.     return(hmsg("Syntax:  SET COUNT number\n\
  1796. Example: SET COUNT 5\n\
  1797. Set up a loop counter, for use with IF COUNT.  Local to current macro\n\
  1798. or command file, inherited by subordinate macros and command files."));
  1799. #endif /* NOSPL */
  1800.  
  1801. case XYDEBU:
  1802. #ifdef DEBUG    
  1803.     return(hmsg("Syntax: SET DEBUG { SESSION, ON, OFF }\n\
  1804. SESSION means display control and 8-bit characters symbolically during\n\
  1805. CONNECT mode.  ON means log debugging information to file debug.log."));
  1806. #else
  1807.     return(hmsg("Syntax: SET DEBUG { SESSION, OFF }\n\
  1808. SESSION means display control and 8-bit characters symbolically during\n\
  1809. CONNECT mode."));
  1810. #endif /* DEBUG */
  1811.  
  1812. case XYDFLT:
  1813.     return(hmsg("Syntax: SET DEFAULT directory\n\
  1814. Change directory.  Equivalent to CD command."));
  1815.  
  1816. case XYDELA: 
  1817.     return(hmsg("Syntax: SET DELAY number\n\
  1818. Number of seconds to wait before sending first packet after SEND command."));
  1819.  
  1820. #ifndef NODIAL
  1821. case XYDIAL:
  1822.     return(hmsga(hmxydial));
  1823. #endif /* NODIAL */
  1824.  
  1825. #ifdef UNIX
  1826. case XYSUSP:
  1827.     return(hmsg("Syntax: SET SUSPEND { OFF, ON }\n\n\
  1828. Disables SUSPEND command, suspend signals, and <esc-char>Z during CONNECT."));
  1829. #endif
  1830.  
  1831. #ifndef NOSCRIPT
  1832. case XYSCRI:
  1833.     return(hmsg("Syntax: SET SCRIPT ECHO { OFF, ON }\n\n\
  1834. Disables/Enables echoing of SCRIPT command operation."));
  1835. #endif /* NOSCRIPT */
  1836.  
  1837. case XYTAKE:
  1838.     return(hmsga(hxytak));
  1839.  
  1840. case XYTERM:
  1841.     return(hmsga(hxyterm));
  1842.  
  1843. case XYDUPL:
  1844.     return(hmsg("Syntax: SET DUPLEX { FULL, HALF }\n\n\
  1845. During CONNECT: FULL means remote host echoes, HALF means C-Kermit\n\
  1846. does its own echoing."));
  1847.  
  1848. case XYESC:
  1849.     return(hmsg("Syntax: SET ESCAPE number\n\n\
  1850. Decimal ASCII value for escape character during CONNECT, normally 28\n\
  1851. (Control-\\).  Type the escape character followed by C to get back to the\n\
  1852. C-Kermit prompt."));
  1853.  
  1854. case XYFILE:
  1855.     return(hmsga(hmxyf));
  1856.  
  1857. case XYFLOW:
  1858.     return(hmsga(hmxyflo));
  1859.  
  1860. case XYHAND:
  1861.    return(hmsga(hmxyhsh));
  1862.  
  1863. #ifdef NETCONN
  1864. case XYHOST:
  1865. return(hmsga(hxyhost));
  1866. case XYNET:
  1867. return(hmsga(hxynet));
  1868.  
  1869. #ifdef SUNX25
  1870. case XYX25:
  1871.     return(hmsga(hxyx25));
  1872.  
  1873. case XYPAD:
  1874.     return(hmsg("Syntax: SET PAD name value\n\
  1875. Set a PAD X.3 parameter with a desired value."));
  1876. #endif /* SUNX25 */ 
  1877. #endif /* NETCONN */
  1878.  
  1879. #ifndef NOSPL
  1880. case XYOUTP:
  1881.     return(hmsg("Syntax: SET OUTPUT PACING <number>\n\
  1882. How many milliseconds to pause after sending each OUTPUT character."));
  1883. #endif /* NOSPL */
  1884.  
  1885. #ifndef NOSETKEY
  1886. case XYKEY:                /* SET KEY */
  1887.     return(hmsga(hmhskey));
  1888. #endif /* NOSETKEY */
  1889.  
  1890. #ifndef NOCSETS
  1891. case XYLANG:
  1892.     return(hmsg("Syntax: SET LANGUAGE name\n\
  1893. Selects language-specific translation rules for text-mode file transfers.\n\
  1894. Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one\n\
  1895. of these is ASCII."));
  1896. #endif /* NOCSETS */
  1897.  
  1898. case XYLINE:
  1899.     printf("\nSyntax: SET LINE devicename\n\
  1900. or:     SET PORT devicename\n\n\
  1901. Select communication device to use.  Normally %s.\n",dftty);
  1902.     if (!dfloc) {
  1903.     printf("\
  1904. If you SET LINE to other than %s, then Kermit\n",dftty);
  1905.     printf("\
  1906. will be in 'local' mode; SET LINE alone will reset Kermit to remote mode.\n\
  1907. To use the modem to dial out, first SET MODEM-DIALER (e.g., to HAYES), then");
  1908. puts("\nSET LINE xxx, next issue the DIAL command, and finally CONNECT.\n");
  1909.     }
  1910.     return(0);
  1911.  
  1912. #ifndef NOSPL
  1913. case XYMACR:
  1914.     return(hmsga(hxymacr));
  1915. #endif /* NOSPL */
  1916.  
  1917. #ifndef NODIAL
  1918. case XYMODM:
  1919.     return(hmsga(hxymodm));
  1920. #endif /* NODIAL */
  1921.  
  1922. case XYPARI:
  1923.     return(hmsg("Syntax: SET PARITY name\n\n\
  1924. Parity to use during terminal connection and file transfer: EVEN, ODD, MARK,\n\
  1925. SPACE, or NONE.  Normally NONE."));
  1926.  
  1927. case XYPROM:
  1928.     return(hmsga(hmxyprm));
  1929.  
  1930. case XYQUIE:
  1931.     return(hmsg("Syntax: SET QUIET {ON, OFF}\n\n\
  1932. Normally OFF.  ON disables most information messages during interactive\n\
  1933. operation."));
  1934.  
  1935. #ifdef CK_SPEED
  1936. case XYQCTL:
  1937.     return(hmsga(hmxyqctl));
  1938. #endif /* CK_SPEED */
  1939.  
  1940. case XYRETR:
  1941.     return(hmsg("Syntax: SET RETRY number\n\n\
  1942. How many times to retransmit a particular packet before giving up."));
  1943.  
  1944. #ifdef UNIX
  1945. case XYSESS:
  1946.     return(hmsg("Syntax: SET SESSION-LOG { BINARY, TEXT }\n\n\
  1947. If BINARY, record all CONNECT characters in session log.  If TEXT, strip\n\
  1948. out carriage returns."));
  1949. #endif /* UNIX */
  1950.  
  1951. case XYSPEE:
  1952.     return(hmsg("Syntax: SET SPEED number\n\n\
  1953. Communication line speed for external tty line specified in most recent\n\
  1954. SET LINE command, in bits per second.  Type SET SPEED ? for a list of\n\
  1955. possible speeds."));
  1956.  
  1957. case XYRECV:
  1958.     return(hmsga(hxyrcv));
  1959. case XYSEND:
  1960.     return(hmsga(hxysnd));
  1961. case XYREPT:
  1962.     return(hmsga(hxyrpt));
  1963.  
  1964. #ifndef NOSERVER
  1965. case XYSERV:
  1966.     return(hmsga(hsetsrv));
  1967. #endif /* NOSERVER */
  1968.  
  1969. #ifdef TNCODE
  1970. case XYTEL:
  1971.     return(hmsga(hxytel));
  1972. #endif /* TNCODE */
  1973.  
  1974. #ifndef NOXMIT
  1975. case XYXMIT:
  1976.     return(hmsga(hsetxmit));
  1977. #endif /* NOXMIT */
  1978.  
  1979. #ifndef NOCSETS
  1980. case XYUNCS:
  1981.     return(hmsg("Syntax: SET UNKNOWN-CHAR-SET action\n\n\
  1982. DISCARD (default) means reject any arriving files encoded in unknown\n\
  1983. character sets.  KEEP means to accept them anyway."));
  1984. #endif /* NOCSETS */
  1985.  
  1986. #ifdef UNIX
  1987. case XYWILD:
  1988.     return(hmsg("Syntax: SET WILDCARD-EXPANSION { KERMIT, SHELL }\n\n\
  1989. KERMIT (the default) means C-Kermit expands filename wildcards in SEND\n\
  1990. and MSEND commands and incoming GET commands.  SHELL means your shell does \
  1991. it."));
  1992. #endif /* UNIX */
  1993.  
  1994. case XYWIND:
  1995.     return(hmsga(hxywind));
  1996.  
  1997. case XYXFER:
  1998.     return(hmsga(hxyxfer));
  1999.  
  2000. default:
  2001.     printf("Not available yet - %s\n",cmdbuf);
  2002.     return(0);
  2003.     }
  2004. }
  2005.  
  2006.  
  2007. /*  D O H R M T  --  Give help about REMOTE command  */
  2008.  
  2009. static char *hrset[] = {
  2010. "Syntax:  REMOTE SET parameter value",
  2011. "Example: REMOTE SET FILE TYPE BINARY\n",
  2012. "Ask the remote Kermit server to set the named parameter to the given value.",
  2013. "Equivalent to typing the corresponding SET command directly to the other",
  2014. "Kermit if it were in interactive mode.", "" };
  2015.  
  2016. int
  2017. dohrmt(xx) int xx; {
  2018.     int x;
  2019.     if (xx == -3) return(hmsga(hmhrmt));
  2020.     if (xx < 0) return(xx);
  2021.     if ((x = cmcfm()) < 0) return(x);
  2022.     switch (xx) {
  2023.  
  2024. case XZCWD:
  2025.     return(hmsg("Syntax: REMOTE CD [ name ]\n\n\
  2026. Ask remote Kermit server to change its working directory or device.\n\
  2027. If the device or directory name is omitted, restore the default."));
  2028.  
  2029. case XZDEL:
  2030.     return(hmsg("Syntax: REMOTE DELETE filespec\n\n\
  2031. Ask the remote Kermit server to delete the named file(s)."));
  2032.  
  2033. case XZDIR:
  2034.     return(hmsg("Syntax: REMOTE DIRECTORY [ filespec ]\n\n\
  2035. Ask the remote Kermit server to provide a directory listing of the named\n\
  2036. file(s) or if no file specification is given, of all files in the current\n\
  2037. directory."));
  2038.  
  2039. case XZHLP:
  2040.     return(hmsg("Syntax: REMOTE HELP\n\n\
  2041. Ask the remote Kermit server to list the services it provides."));
  2042.  
  2043. case XZHOS:
  2044.     return(hmsg("Syntax: REMOTE HOST command\n\n\
  2045. Send a command to the remote host computer in its own command language\n\
  2046. through the remote Kermit server."));
  2047.  
  2048. #ifndef NOFRILLS
  2049. case XZKER:
  2050.     return(hmsg("Syntax: REMOTE KERMIT command\n\n\
  2051. Send a command to the remote Kermit server in its own command language."));
  2052.  
  2053. case XZLGI:
  2054.     return(hmsg("Syntax: REMOTE LOGIN user password [ account ]\n\n\
  2055. Log in to a remote Kermit server that requires you login."));
  2056.  
  2057. case XZLGO:
  2058.     return(hmsg("Syntax: REMOTE LOGOUT\n\n\
  2059. Log out from a remote Kermit server to which you have previously logged in."));
  2060.  
  2061. case XZPRI:
  2062.     return(hmsg("Syntax: REMOTE PRINT filespec [ options ]\n\n\
  2063. Send the specified file(s) to the remote Kermit and ask it to have the\n\
  2064. file printed on the remote system's printer, using any specified options."));
  2065. #endif /* NOFRILLS */
  2066.  
  2067. case XZSET:
  2068.     return(hmsga(hrset));
  2069.  
  2070. case XZSPA:
  2071.     return(hmsg("Syntax: REMOTE SPACE [ name ]\n\n\
  2072. Ask the remote Kermit server to tell you about its disk space on the current\n\
  2073. disk or directory, or in the one that you name."));
  2074.  
  2075. #ifndef NOFRILLS
  2076. case XZTYP:
  2077.     return(hmsg("Syntax: REMOTE TYPE file\n\n\
  2078. Ask the remote Kermit server to type the named file(s) on your screen."));
  2079.  
  2080. case XZWHO:
  2081.     return(hmsg("Syntax: REMOTE WHO [ name ]\n\n\
  2082. Ask the remote Kermit server to list who's logged in, or to give information\n\
  2083. about the named user."));
  2084. #endif /* NOFRILLS */
  2085.  
  2086. default:
  2087.     if ((x = cmcfm()) < 0) return(x);
  2088.     printf("not working yet - %s\n",cmdbuf);
  2089.     return(-2);
  2090.     }
  2091. }
  2092.  
  2093. #endif /* NOHELP */
  2094. #endif /* NOICP */
  2095.